package com.pz.controller;

import com.pz.service.BlogCombinationService;
import com.pz.utils.MapUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author：PZ
 * @Date: 2020/11/5 14 41
 */

@Controller
public class BlogCombinationController {

    @Autowired
    BlogCombinationService blogCombinationService;

    @GetMapping(value = "/blogCombination_blogs")
    public String findBlogByPage(@RequestParam Map<String, Object> map, Model m) {
        m.addAttribute("blogs", blogCombinationService.findBlogCombinationByCondition(MapUtil.handle(map)));
        //渲染部分页面
        return "admin/blogs::table_refresh";
    }
}
